package net.gyapp.markim.core.entity;

import com.chad.library.adapter.base.entity.MultiItemEntity;

import net.gyapp.markim.module.contact.adapter.ContactsAdapter;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Transient;

import java.io.Serializable;

/**
 * Auther:  winds
 * Email:   heardown@163.com
 * Date:    2018/7/19.
 * Desc:    成员表
 */
@Entity
public class MemberEntity implements IEntity, MultiItemEntity, Serializable {
    private static final long serialVersionUID = 6638540313985585123L;
    @Id
    public Long id;

    public Long groupId;     //外键 群组id
    public Long friendsId;     //外键 好友分组id

    public Long userId;   //会员id 关联会员

    public String memberId; //成员id
    public String avatar;   //头像
    public String name;     //名称
    public String nick;     //昵称
    public String remark;   //备注

    public String extra1;  //扩展字段1
    public String extra2;  //扩展字段2
    public String extra3;  //扩展字段3

    @Transient
    public String firstLetter;


    @Generated(hash = 623566254)
    public MemberEntity(Long id, Long groupId, Long friendsId, Long userId,
            String memberId, String avatar, String name, String nick, String remark,
            String extra1, String extra2, String extra3) {
        this.id = id;
        this.groupId = groupId;
        this.friendsId = friendsId;
        this.userId = userId;
        this.memberId = memberId;
        this.avatar = avatar;
        this.name = name;
        this.nick = nick;
        this.remark = remark;
        this.extra1 = extra1;
        this.extra2 = extra2;
        this.extra3 = extra3;
    }


    @Generated(hash = 1903663216)
    public MemberEntity() {
    }


    @Override
    public String toString() {
        return "MemberEntity{" +
                "id=" + id +
                ", groupId=" + groupId +
                ", friendsId=" + friendsId +
                ", userId=" + userId +
                ", memberId='" + memberId + '\'' +
                ", avatar='" + avatar + '\'' +
                ", name='" + name + '\'' +
                ", nick='" + nick + '\'' +
                ", remark='" + remark + '\'' +
                ", extra1='" + extra1 + '\'' +
                ", extra2='" + extra2 + '\'' +
                ", extra3='" + extra3 + '\'' +
                '}';
    }


    @Override
    public int getItemType() {
        return ContactsAdapter.TYPE_CONTACT_USER;
    }


    public Long getId() {
        return this.id;
    }


    public void setId(Long id) {
        this.id = id;
    }


    public Long getGroupId() {
        return this.groupId;
    }


    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }


    public Long getFriendsId() {
        return this.friendsId;
    }


    public void setFriendsId(Long friendsId) {
        this.friendsId = friendsId;
    }


    public Long getUserId() {
        return this.userId;
    }


    public void setUserId(Long userId) {
        this.userId = userId;
    }


    public String getMemberId() {
        return this.memberId;
    }


    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }


    public String getAvatar() {
        return this.avatar;
    }


    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }


    public String getName() {
        return this.name;
    }


    public void setName(String name) {
        this.name = name;
    }


    public String getNick() {
        return this.nick;
    }


    public void setNick(String nick) {
        this.nick = nick;
    }


    public String getRemark() {
        return this.remark;
    }


    public void setRemark(String remark) {
        this.remark = remark;
    }


    public String getExtra1() {
        return this.extra1;
    }


    public void setExtra1(String extra1) {
        this.extra1 = extra1;
    }


    public String getExtra2() {
        return this.extra2;
    }


    public void setExtra2(String extra2) {
        this.extra2 = extra2;
    }


    public String getExtra3() {
        return this.extra3;
    }


    public void setExtra3(String extra3) {
        this.extra3 = extra3;
    }
}
